#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QMap>
#include <QString>

#include "widget.h"
#include "paywindow.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

    struct Dish
    {
        QString name;
        int price;
        int count;
    };

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    static QMap<QString, Dish> dishMap;

void updateDishDisplay();

void updateDishCount(const QString& name, int change);

private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

    void on_pushButton_14_clicked();

    void on_pushButton_15_clicked();


    void on_pushButton_16_clicked();

    void on_pushButton_17_clicked();

    void on_pushButton_18_clicked();

    void on_pushButton_19_clicked();

    void on_pushButton_10_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_22_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_12_clicked();

    void on_pushButton_13_clicked();

    void on_pushButton_20_clicked();

    void on_pushButton_21_clicked();

    void on_pushButton_23_clicked();

    void on_pushButton_24_clicked();

    void on_pushButton_25_clicked();

signals://自定义信号
    void sendSignal(QString me,QString pr);

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
